﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FtpServerAdministrator
{
    public interface IFtpServerConfigruation
    {
        /// <summary>
        /// Add a new user to ftp server
        /// </summary>
        /// <param name="user">the user</param>
        void AddUser(FtpUser user);
        /// <summary>
        /// remove a existed user
        /// </summary>
        /// <param name="userName">the userName of some existed user</param>
        void RemoveUser(String userName);
        /// <summary>
        /// modify some user's configuration
        /// </summary>
        /// <param name="userName">the userName of that user</param>
        /// <param name="newUser">the configuration informations</param>
        void ModifyUser(String userName, FtpUser newUser);

        /// <summary>
        /// find a existed user by its userName
        /// </summary>
        /// <param name="userName">the userName of the wanted user </param>
        /// <returns>the confiuration of that user</returns>
        FtpUser FindUser(String userName);
        

        /// <summary>
        /// This should be used to do some batch work.
        /// Start a batch work.
        /// </summary>
        void StartConfiguration();
        /// <summary>
        /// End a batch work.
        /// </summary>
        void EndConfiguration();
    }
}
